package com.jl.model;

import lombok.Data;
import org.apache.ibatis.type.Alias;

import javax.persistence.*;
import java.math.BigDecimal;

@Data
@Table(name = "user")
@Alias("user")
public class User {

    public User() {
    }



    public User(String openId, String nickName, String sex, String province, String city, String country, String headImgUrl, String unionUId) {
        this.openId = openId;
        this.nickName = nickName;
        this.sex = sex;
        this.province = province;
        this.city = city;
        this.country = country;
        this.headImgUrl = headImgUrl;
        this.unionUId = unionUId;
    }

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    @Column(name = "phone")
    private String phone;
    @Column(name = "password")
    private String password;
    @Column(name = "open_id")
    private String openId;
    @Column(name = "nick_name")
    private String nickName;
    @Column(name = "sex")
    private String sex;
    @Column(name = "province")
    private String province;
    @Column(name = "city")
    private String city;
    @Column(name = "country")
    private String country;
    @Column(name = "head_img_url")
    private String headImgUrl;
    @Column(name = "union_id")
    private String unionUId;
    @Column(name = "user_role")
    private String userRole;
    @Column(name = "coin")
    private BigDecimal coin;
    @Column(name = "proxy_rate")
    private BigDecimal proxyRate;
    @Column(name = "bank_name")
    private String bankName;
    @Column(name = "bank_no")
    private String bankNo;
    @Column(name = "bank")
    private String bank;
    @Column(name = "alipay")
    private String alipay;
}
